package com.zz.common.codeGenerator.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.LocalDateTime;
import java.util.Map;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

/**
 * 表单Schema配置实体类
 *
 * @author zl
 * @since 2025-11-22 08:29:41
 */
@Data
@TableName(value = "gen_form_schema_t", autoResultMap = true)
public class GenFormSchema implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 主键ID
     */
    @TableId
    @TableField(value = "schema_id" )
    private String schemaId;

    /**
     * 关联的业务表ID
     */
    @TableField(value = "table_id" )
    private String tableId;

    /**
     * 关联的业务表名称
     */
    @TableField(value = "table_name" )
    private String tableName;

    /**
     * 版本号
     */
    @TableField(value = "version" )
    private String version;

    /**
     * 表单Schema配置内容
     */
    @TableField(value = "schema_json", typeHandler = JacksonTypeHandler.class )
    private Map<String, Object> schemaJson;

    /**
     * 创建人
     */
    @TableField(value = "create_by" )
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_date" )
    private LocalDateTime createDate;

    /**
     * 更新人
     */
    @TableField(value = "update_by" )
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_date" )
    private LocalDateTime updateDate;

    /**
     * 备注
     */
    @TableField(value = "remark" )
    private String remark;

    /**
     * 删除标识
     */
    @TableField(value = "del_flag" )
    private String delFlag;


    // ================= 以下为自定义字段 =================

}
